home *** CD-ROM | disk | FTP | other *** search
/ Merciful 2 / Merciful - Disc 2.iso / software / d / devioustools21.dms / devioustools21.adf / utils / 007.lzx / netbeginner / scripts / StopInternet < prev    next >
Text File  |  1989-01-17  |  2KB  |  49 lines

  1. ;*** Use this example script to stop your dynamic PPP Internet
  2. ;*** connection so you can keep the original Stopnet script intact
  3. ;***
  4. ;*** Utilisez ce script exemple pour arrêter votre connection
  5. ;*** Internet PPP dynamique, vous garderez ainsi le script original
  6. ;*** Stopnet intact.
  7. ;***
  8. ;*** NEEDED: AmiTCP/IP 4.0 or up (Aminet:comm/tcp/AmiTCP_demo_40.lha)
  9. ;***         PPP 1.30 or up      (Aminet:comm/net/PPP1_30.lha)
  10. ;***         Serline             (included)
  11. ;*** USEFULL: Online-o-Meter      (Aminet:comm/misc/Online1_4.lha)
  12. ;***          PhoneBill           (Aminet:comm/misc/pbill33d.lha)
  13. ;***          socket.library      (available from Thor Home pages)
  14. ;***
  15. ;*** note: lines begining with ';' are comments ;)
  16. ;***
  17.  
  18. if not exists env:IPMODEMPORT
  19.    setenv IPMODEMPORT "serial.device 0"
  20. ;                      ^^^^^^^^^^^^^ ^
  21. ;               must be the same as in StartInternet
  22. ;                 idem que pour StartInternet
  23. endif
  24.  
  25. rx 'if show("P","AMITCP") then return 5' >NIL:
  26. if warn                                  ; if AmiTCP still active,
  27.    stopnet                               ; then stop it.
  28. endif
  29.  
  30. serline "!" $IPMODEMPORT
  31. if $rc EQ 0                              ; if modem still online,
  32.    offline ppp0                          ; then hang up.
  33. endif
  34.  
  35. serline "!" $IPMODEMPORT
  36. if $rc EQ 0
  37.    echo "Carrier still present!"
  38.    quit
  39. else
  40. ; *** if modem is offline and Online-o-Meter exists and is ***
  41. ; *** still running, than stop it too.                     ***
  42. ; ***                                                      ***
  43. ; *** si le modem est offline et que Online-o-meter existe ***
  44. ; *** et tourne toujours, alors on le stoppe aussi         ***
  45.  
  46.    rx 'if show("P","OnlineREXX") then address "OnlineREXX" stop'
  47.  
  48. endif
  49.